/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package view;

import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author aeguzkiza
 * Class created to add hidden information tyo JTree nodes.
 */
public class Patient {
    String name;
    String surName;
    Integer id;

    Patient(String Name, String SurName, Integer id) {
        this.name = Name;
        this.surName = SurName;
        this.id = id;
    }
    public Integer getPatientId(){
        return this.id;
    }
    public String getName() {
        return this.name;
    }
    public String SurName() {
        return this.surName;
    }
    public void setPatientName(String Name, String SurName) {
        this.name = Name;
        this.surName = SurName;
    }
    public String toString() {        
        String node;
        if(surName == null){   // Case newPatient.
            node = name;
        }else{
            node = name+" "+surName;
        }
        return node;
    }
}

